#ifndef _MAZE_EXPLORER
#define _MAZE_EXPLORER

// Make sure the correct oscillator speed is set
#undef HSE_Value
#define HSE_Value ((u32)12000000)

#include "circle_api.h"
#include "stm32f10x_conf.h"
#include "create_driver.h"
#include "ping_driver.h"

// The following should be the minimal CircleOS version needed by your application
#define NEEDEDVERSION "V 3.7"

#define EMERGENCY_STOP_VALUE 600

typedef struct
{
    u16 frontPing;
    u16 lfPing;
    u16 lrPing;
    s16 leftVel;
    s16 rightVel;
} GLOBALS;


/* Function Prototypes */
void USART1_Init( void );
void TIM1_Init( void );
void CREATE_Init( void );
void GLOBALS_Init( void );
void NVIC_Configuration(void);
tHandler TIM1_Irq( void );
void updateStatus( void );
u32 getTimeMicro( void );
void SendShit( void );
void AccelerometerMovement( void );


#endif //_MAZE_EXPLORER